Naanou
Class ClientConfig

Contains client configuration data

Field Summary
string CHAT_URL
string chatUrl
string DOWNLOAD_DEFAULT_PATH
string downloadDefaultPath
string HOME_URL
string homeUrl
bool initialized

Constructor Summary
ClientConfig()
        Initializes a new instance of the ClientConfig class.

Property Summary
string ChatUrl
         Chat Url
string DownloadDefaultPath
         Default path to use for downloads (relative). Resolve to absolute at runtime. Always has trailing slash.
string HomeUrl
         Home/help url
int MaxSearchResults
bool ModAvail

Method Summary
object IConfigurationSectionHandler.Create(object parent, object configContext, System.Xml.XmlNode section)
void Initialize()
string ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, string defaultValue)
         Reads string setting
bool ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, bool defaultValue)
         Reads boolean setting
int ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, int defaultValue)
         Reads int setting
Naanou.Common.LogLevel ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, Naanou.Common.LogLevel defaultValue)
         Reads setting
System.Uri ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, System.Uri defaultValue)
         Reads Uri setting

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

CHAT_URL

private string CHAT_URL


chatUrl

private string chatUrl


DOWNLOAD_DEFAULT_PATH

private string DOWNLOAD_DEFAULT_PATH


downloadDefaultPath

private string downloadDefaultPath


HOME_URL

private string HOME_URL


homeUrl

private string homeUrl


initialized

private bool initialized

Constructor Detail

ClientConfig

public ClientConfig()

Initializes a new instance of the ClientConfig class.

Property Detail

ChatUrl

public string ChatUrl

Chat Url


DownloadDefaultPath

public string DownloadDefaultPath

Default path to use for downloads (relative). Resolve to absolute at runtime. Always has trailing slash.


HomeUrl

public string HomeUrl

Home/help url


MaxSearchResults

public int MaxSearchResults


ModAvail

public bool ModAvail

Method Detail

IConfigurationSectionHandler.Create

private object IConfigurationSectionHandler.Create(object parent,
                                                   object configContext,
                                                   System.Xml.XmlNode section)


Initialize

private void Initialize()


ReadSetting

public string ReadSetting(System.Collections.Specialized.NameValueCollection settings,
                          string key,
                          string defaultValue)

Reads string setting

Parameters:
settings - Settings
key - Key
defaultValue - Default value
Returns:
Read setting, or default value

ReadSetting

public bool ReadSetting(System.Collections.Specialized.NameValueCollection settings,
                        string key,
                        bool defaultValue)

Reads boolean setting

Parameters:
settings - Settings
key - Key
defaultValue - Default value
Returns:
Read setting, or default value

ReadSetting

public int ReadSetting(System.Collections.Specialized.NameValueCollection settings,
                       string key,
                       int defaultValue)

Reads int setting

Parameters:
settings - Settings
key - Key
defaultValue - Default value
Returns:
Read setting, or default value

ReadSetting

public Naanou.Common.LogLevel ReadSetting(System.Collections.Specialized.NameValueCollection settings,
                                          string key,
                                          Naanou.Common.LogLevel defaultValue)

Reads setting

Parameters:
settings - Settings
key - Key
defaultValue - Default value
Returns:
Read setting, or default value

ReadSetting

public System.Uri ReadSetting(System.Collections.Specialized.NameValueCollection settings,
                              string key,
                              System.Uri defaultValue)

Reads Uri setting

Parameters:
settings - Settings
key - Key
defaultValue - Default value
Returns:
Read setting, or default value